﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace CC98.Data
{
    /// <summary>
    /// CC98 User
    /// </summary>
    [DataContract(Namespace = Utility.SchemaNamespace)]
    public class User
    {
        public static readonly User Anonymous = new User();

        public User(string name)
        {
            this.Name = name;
            this.IsAnonymouse = false;
        }

        /// <summary>
        /// Anonymous user
        /// </summary>
        private User()
        {
            this.Name = ResourcesHelper.GetString("AnonymousUsername");
            this.IsAnonymouse = true;
        }

        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public bool IsAnonymouse { get; private set; }
    }
}
